import request from "./request"

// 添加意见
export const AddadviseApi = (obj:objApi)=>{
    return request.post<any,axiosType<addAdviseTypes>>("/pro//advise/add",obj)
} 

// 获取意见列表
export const GetAdviseApi = (obj?:{title?:string,keyword?:string,time?:string,type?:string})=>{
    return request.post<any,axiosType<addAdviseTypes[]>>("/pro/advise/list",obj)
}

// 删除意见
export const DeleAdviseApi = (_id:string)=>{
    return request.post('/pro/advise/delete',{_id})
}

// 获取意见详情
export const AdviseDeApi = (_id:string)=>{
    return request.post<any,axiosType<addAdviseTypes>>("/pro//advise/detail",{_id})
}

// 修改意见
export const uploadAdviseApi  = (obj:objApi &{_id:string})=>{
    return request.post<any,axiosType<{n:number,nModified:number,ok:number}>>("/pro/advise/update",obj)
}